package io.jnet.server.api;

import io.jnet.common.channelcontext.ChannelContext;
import io.jnet.common.streamprocessor.StreamProcessor;

public interface ServerChannelContext extends ChannelContext
{
    public void registerRead();
    
    public void commitWrite();
    
    public StreamProcessor[] processors();
    
    /**
     * 向通道上主动推送数据。 注意：有些实现不支持推送数据
     * 
     * @param send
     * @param index
     * @throws Throwable
     */
    public void push(Object send, int index) throws Throwable;
    
}
